Repository navigation
fix(id/web): encode xterm modifiers for special keys in world keyboard encoder (#732) - #3184
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
🤖 Review — queue worker, lane E (user/review discharged) Reviewed PR #3184 @64e63c01d against the Option 1 decision recorded on #732:
Verdict: approved on substance. The only remaining gate is the dispatched id-check run 41231798279 (queued/in-progress in the fleet runner backlog since 18:56Z). Merge when it settles green. |
Fixes #732 — implements the Option 1 decision recorded on the issue (queue task 4622; triage task 1074 CONFIRMED the matrix on main).
Policy (one rule for every special key × modifier)
terminalBytesForKeyinpkgs/id/web/src/world-keyboard.tsno longer drops or silently degrades modified special keys:1 + Shift·1 + Alt·2 + Ctrl·4): tilde keys asCSI <code>;<mod>~(Ctrl+Delete =ESC[3;5~, Alt+PageUp =ESC[5;3~), letter keys asCSI 1;<mod><letter>(Alt+Up =ESC[1;3A, Shift+Home/End =ESC[1;2H/ESC[1;2F). Shift+Tab keeps the traditionalESC[Z; Shift+Tab with further modifiers usesCSI 1;<mod>Z.ESC DEL). The prefix signals "modified" even though those keys cannot distinguish which modifier was held.null, so they no longer leak to the browser (Alt+Left/Right history navigation) via theworld.tscaller.Note on the Roc decoder
pkgs/id/examples/roc-world/Key.rocsurfaces the new sequences asUnknown(bytes)today (its pinned test:Key.parse(ESC[1;5C) == [Unknown(ESC[1;5C)]) — preserved, not misreported. Naming modified variants inKey.rocis a later extension and is out of scope here.Tests
world-keyboard.test.tspin the policy: Ctrl+Delete, Alt+PageUp, Alt+Arrow, Ctrl+ArrowLeft, Shift+Home/End, Shift+Tab (+Ctrl), Alt+Backspace, Alt+Enter, plus a matrix test asserting no (special × modifier) combination returns null or the plain bytes.null(browser shortcut); under Option 1 it isESC[1;5D.vitest run src/world-keyboard.test.ts— 8/8 pass with the fix; 5 of the new/changed tests fail against the pristine encoder.tsc --noEmitpasses.Queue task 4622, Lane D.
Need help on this PR? Tag
@codesmith-botwith what you need.